//模型创建 https://www.sequelize.com.cn/core-concepts/model-basics#%E5%AD%97%E7%AC%A6%E4%B8%B2

const {
  aes
} = require("../utils/utils.crypto");

module.exports = (sequelize, Sequelize) => {
  return sequelize.define("daily", {
    id: {
      type: Sequelize.UUID,
      notNull: true,
      primaryKey: true,
      defaultValue: Sequelize.UUIDV4, // 或 DataTypes.UUIDV1
    },
    dayDate: {
      type: Sequelize.STRING,
      notNull: true,
      comment: "日期",
      notEmpty: true,
    },
    dayIncomeMoney: {
      type: Sequelize.STRING,
      comment: "当日收入现金",
    },
    dayIncomeWechat: {
      type: Sequelize.STRING,
      comment: "当日收入微信",
    },
    dayIncomeAlipay: {
      type: Sequelize.STRING,
      comment: "当日收入支付宝",
    },

    dayIncomeAllMoney: {
      type: Sequelize.STRING,
      comment: "当日收入合计",
    },

    dayBalanceMoney: {
      type: Sequelize.STRING,
      comment: "当日现金余额",
    },

    dayBalanceWechat: {
      type: Sequelize.STRING,
      comment: "当日微信余额",
    },

    dayBalanceAlipay: {
      type: Sequelize.STRING,
      comment: "当日支付宝余额",
    },

    dayBalancePaymentCode: {
      type: Sequelize.STRING,
      comment: "当日收款码余额",
    },

    dayBalanceAllMoney: {
      type: Sequelize.STRING,
      comment: "当日合计余额",
    },

    dayIncomePaymentCode: {
      type: Sequelize.STRING,
      comment: "当日收入收款码",
    },

    sportVoteCashPrize: {
      type: Sequelize.STRING,
      comment: "体彩彩票兑奖",
    },

    sportScratchCardCashAPrize: {
      type: Sequelize.STRING,
      comment: "体彩刮刮卡兑奖",
    },

    luckyLotteryRedemption: {
      type: Sequelize.STRING,
      comment: "福彩兑奖",
    },

    sportPayables: {
      type: Sequelize.STRING,
      comment: "体彩应交款",
    },

    luckyPayables: {
      type: Sequelize.STRING,
      comment: "福彩应交款",
    },

    scratchCardPayables: {
      type: Sequelize.STRING,
      comment: "刮刮卡应交款",
    },

    totalPayables: {
      type: Sequelize.STRING,
      comment: "应交款合计",
    },

    sportAtThatTime: {
      type: Sequelize.STRING,
      comment: "体彩机当日余额",
    },

    luckyAtThatTime: {
      type: Sequelize.STRING,
      comment: "福彩机当日余额",
    },

    scratchCardAtThatTime: {
      type: Sequelize.STRING,
      comment: "刮刮卡当日余额",
    },

    totalAtThatTime: {
      type: Sequelize.STRING,
      comment: "当日余额汇总",
    },

    // createdAt: {
    //   type: Sequelize.STRING,
    //   comment: "修改时间",
    // },

    sportRechargeAmount: {
      type: Sequelize.STRING,
      comment: "体彩充值金额",
    },

    luckyRechargeAmount: {
      type: Sequelize.STRING,
      comment: "福彩充值金额",
    },

    sportCardSubscriptionAmount: {
      type: Sequelize.STRING,
      comment: "体彩订卡金额",
    },

    luckyCardSubscriptionAmount: {
      type: Sequelize.STRING,
      comment: "福彩订卡金额",
    },

    sportsLotteryCommission: {
      type: Sequelize.STRING,
      comment: "体彩佣金",
    },

    luckyLotteryCommission: {
      type: Sequelize.STRING,
      comment: "福彩佣金",
    },

    cashWithdrawalAmountOf100: {
      type: Sequelize.STRING,
      comment: "百元现金取走量",
    },

    takeAwayPeople: {
      type: Sequelize.STRING,
      comment: "取走人",
    },

    presenter: {
      type: Sequelize.STRING,
      comment: "提交人",
    },

    substitutePersonnel: {
      type: Sequelize.STRING,
      comment: "替班人员",
    },

    shop: {
      type: Sequelize.STRING,
      comment: "店铺",
    },

    difference: {
      type: Sequelize.STRING,
      comment: "差异",
    },

    // dayIncomeAlipay: {
    //   type: Sequelize.STRING,
    //   comment: "当日收入支付宝",
    // },

    weChatRecharge: {
      type: Sequelize.STRING,
      comment: "微信充值",
    },

    state: {
      type: Sequelize.BOOLEAN,
      comment: "状态",
      defaultValue: true,
    },

    dailyIncomeScrapingCard: {
      type: Sequelize.STRING,
      comment: "当日收入刮刮卡 刮刮卡转入",
    },

    notes: {
      type: Sequelize.STRING,
      comment: "备注",
    },
    alipayRecharge: {
      type: Sequelize.STRING,
      comment: "支付宝充值",
    },
    redemptionAllMoney: {
      type: Sequelize.STRING,
      comment: "兑奖合计",
    },
    dailyOutScrapingCard: {
      type: Sequelize.STRING,
      comment: "刮刮卡转出 (当日)",
    },
    scrapingCardCommission: {
      type: Sequelize.STRING,
      comment: "刮刮卡佣金",
    },
    nextDailyOutScrapingCard: {
      type: Sequelize.STRING,
      comment: "刮刮卡转出（次日）",
    },
  });
};